package com.example.fableoid;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.widget.TextView;

public class Story extends Activity {

	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
			
		setContentView(R.layout.story);
		
		TextView title_text = (TextView) findViewById(R.id.title);
		Intent i = getIntent();
		String title = i.getStringExtra("title");
		
		TextView story = (TextView) findViewById(R.id.story);
		
		TextView moral = (TextView) findViewById(R.id.moral);
		
		
		if (title.equalsIgnoreCase("The Ant and the Grasshopper")) {
			title_text.setText(title);
			story.setText(R.string.ant_story);
			moral.setText(R.string.ant_moral);
					
		}
		
		if(title.equalsIgnoreCase("The Fox and the Grapes")) {
			title_text.setText(title);
			story.setText(R.string.fox_story);
			moral.setText(R.string.fox_moral);
		}
		
		if(title.equalsIgnoreCase("The Wind and the Sun")) {
			title_text.setText(title);
			story.setText(R.string.wind_story);
			moral.setText(R.string.wind_moral);
		}
		
		if(title.equalsIgnoreCase("The Miser and his Gold")) {
			title_text.setText(title);
			story.setText(R.string.miser_story);
			moral.setText(R.string.miser_moral);
		}
			
		if(title.equalsIgnoreCase("The Frog and the Ox")) {
			title_text.setText(title);
			story.setText(R.string.frog_story);
			moral.setText(R.string.frog_moral);
		}
	
	
		
		
	}
	
	public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_main, menu);
        return true;
    }
}
